For Loops Exercise and Solution 3

Exercise 3: Write a program that reads 5 numbers, calculates the sum of positive numbers only.

See below the code:
	sum = 0
        for i in range (5): 
            number = input ("Enter a number: ") 
            number = int (number) 
            if (number > 0 ) : 
                sum = sum + number 
        print ("The total of a positive numbers is: ", sum)
	
For more details, please contact me here.
Date of last modification: 2021